/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package quanlinganhang.bus;

import java.sql.SQLException;
import java.util.ArrayList;
import quanlinganhang.dao.AccountDAO;
import quanlinganhang.dto.AccountDTO;

/**
 *
 * @author phamduong
 */
public class AccountBUS {
    
    //close account
    public static boolean deleteAccount(String accountNo)
            throws SQLException, ClassNotFoundException{
        return AccountDAO.CloseAccount(accountNo);
    }


    public static ArrayList GetListAccount() throws ClassNotFoundException, SQLException {
        return AccountDAO.GetListAccount();
    }

    public static ArrayList GetAccountTypes() throws ClassNotFoundException, SQLException {
        return AccountDAO.GetAccountType();
    }

    public static boolean AddAccount(AccountDTO account) throws ClassNotFoundException, SQLException {
        return AccountDAO.AddAcount(account);
    }

    public static int GetTerm(String TenLoaiTK) throws ClassNotFoundException, SQLException {
        return AccountDAO.GetAccountTerm(TenLoaiTK);
    }

    public static long GetAccountTypeId(String TenLoaiTK) throws ClassNotFoundException, SQLException {
        return AccountDAO.GetAccountTypeId(TenLoaiTK);
    }
}
